package mx.itesm.paint_platoon;

import mx.itesm.paint_platoon.juego.NivelDos;

import org.cocos2d.layers.CCScene;
import org.cocos2d.nodes.CCDirector;
import org.cocos2d.opengl.CCGLSurfaceView;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;


public class LanzadorNivelDos extends Activity 
{
	// Declarar un glSurfaceView
	private CCGLSurfaceView glSurfaceView;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.activity_pantalla_juego);
        // 2. Crear el objeto surfaceView
        this.glSurfaceView = new CCGLSurfaceView(this);
        setContentView(this.glSurfaceView);
    }
    
    @Override
    protected void onStart() {
    	super.onStart();
    	
    	CCDirector.sharedDirector().attachInView(glSurfaceView);
    	CCDirector.sharedDirector().setDisplayFPS(true);
    	CCDirector.sharedDirector().setAnimationInterval(1.0f/60.0f);
    	
    	CCScene escena = NivelDos.scene();
    	CCDirector.sharedDirector().runWithScene(escena);
    	
    	//int puntaje = CCDirector.sharedDirector().
    }
    
    @Override
    protected void onPause() {
    	// TODO Auto-generated method stub
    	super.onPause();
    	CCDirector.sharedDirector().pause();
    }
    
    @Override
    protected void onResume() {
    	// TODO Auto-generated method stub
    	super.onResume();
    	CCDirector.sharedDirector().resume();
    }
    
    @Override
    protected void onStop() {
    	// TODO Auto-generated method stub
    	super.onStop();
    	CCDirector.sharedDirector().end();
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
    	getMenuInflater().inflate(R.menu.activity_paint__platoon, menu);
        return true;
    }

    
}